<?php
class ControllerHeader
{
	protected $keys = array();
	protected $template;
	
	public function __construct()
	{
		$this->menu();
		$this->info();
	}
	
	private function menu()
	{	
		for($i=1;$i<=BOARDROOM_COUNT;$i++)
		{
			$this->keys['boardroomNumber'][$i]['number'] = $i;  
		}
		$this->template = View::create('./templates/header/menu.html',$this->keys);
		View::assign('header',$this->template);	
		unset($this->keys);
		unset($this->template);
	}
	
	private function info()
	{
		$this->keys['number'] = BOARDROOM_NUMBER;	
		$this->keys['login'] = $_SESSION['AUTH_LOGIN'];
		$this->template = View::create('templates/header/info.html',$this->keys);
		View::assign('header',$this->template);
		unset($this->keys);
		unset($this->template);
	}
	
	public function __call($methodName,$arguments)
	{
		throw new Exception ('Private function - '.$methodName);
	}	
}